head.js("js/common.js",function(){
    (function(){



//    登录后
        if (!sessionStorage.getItem('rank')) {
            location.href = 'login.html';
        }

//员工信息
        var check =  $(".work li:not(:eq(6),:eq(8))");
        check.click(function () {
            $("#mainContent").html(' ');
            $.ajax({
                url: "profile.html",
                type: "GET",
                success: function (result) {
                    console.log(result);
                    $("#mainContent").html(result);
                },
                error: function (err) {
                    console.log(err);
                }
            });

        });
//人员列表
        $(function(){

            $('.side-bar').on('click','a',function(e){
                var part = $(e.target);
                ajaxRequest('http://192.168.0.51:9096/pm/api/?s=/home/index/getPartList', dataBody,partList);
            });
            function partList (){
                console.log(11)
            }
        })



//邮件发送
        $(".table").on('click','td',function(e){
            var otd ;
            var el = $(e.target);
            $('#inputEmail1').val('');
            $('#theme-drawer').val('');
            var inputEmail1 = el.children('h3').text();
            var theme = el.children('p').text();
            $('#inputEmail1').val(inputEmail1);
            $('#theme-drawer').val(theme);
            //console.log(inputEmail1);
            el.addClass('current').parent().siblings().children('td').removeClass('current');
        });





        setInterval(function(){
            $('.new li:last').css({'height':'0px','opacity': '0'}).insertBefore('.new li:first').animate({'height':'35px','opacity': '1'},200, function() {
                $(this).removeAttr('style');
            });
        },2500);

//淡入淡出
        /*    setInterval(function(){
         $('.new li:last').fadeOut(500).insertBefore('.new li:first').fadeIn()
         },2300);*/

    })(jQuery)
})


